program main

    use swift_file_m, only: rename, is_exist

    call system("touch ./example/1.txt")
    if (is_exist("./example/1.txt")) then
        call rename("./example/1.txt", "./example/2.txt")
    elseif (is_exist("./example/2.txt")) then
        call rename("./example/2.txt", "./example/1.txt")
    end if

    call system("rm example/*.txt")

end program main
